﻿/*
 * @Autor: PK
 * @Date: 2021-03-31 13:34:14
 * @Description: 站台的抽象类，在Agency基础上设置了默认的一些功能，可以继承该类实现自己的站台，减少代码
 */

using ShkSimulation.core.template.agency;
using ShkSimulation.core.template.customer;
using ShkSimulation.core.template.model;

namespace ShkSimulation.carsharing {

    public abstract class CarsharingStation : Agency {
        
        protected CarsharingStation(BaseAgencyParams baseAgencyParams) : base(baseAgencyParams) {
        }
        
        public abstract void TravelerArrive(CarsharingTraveler traveler);
        public abstract void TravelerServe(CarsharingTraveler traveler);
        public abstract void TravelerDepart(CarsharingTraveler traveler);

        public sealed override void Arrive(Customer customer){
            TravelerArrive(customer as CarsharingTraveler);
        }

        public sealed override void Serve(Customer customer){
            TravelerServe(customer as CarsharingTraveler);
        }

        public sealed override void Depart(Customer customer){
            TravelerDepart(customer as CarsharingTraveler);
        }

    }
}
